<%-- 
    Document   : logoutaction
    Created on : Dec 8, 2009, 3:36:53 PM
    Author     : gabriel
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="br.com.zumbits.avd.web.client.Conn" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Another Disk Virtual</title>
        <%
        Conn c = (Conn) session.getAttribute("conn");
        String session_id = session.getAttribute("session_id").toString();
        String currentpath = request.getParameter("currentPath");
        String name = request.getParameter("name");
        
        if(c != null && name != null) {
            String statuscreatefolder = c.createFolder(session_id, currentpath, name);
            
            if(statuscreatefolder.equals(Conn.MKDIR_SUCCESS)){
                response.sendRedirect("startpage.jsp?currentPath="+currentpath);
            }
        }
        %>
    </head>
    <body>
        <h1>Redirecionando...</h1>
    </body>
</html>
